import datas from '@/datas/getDatas.js';
import {Http} from '@/utils/http.js';
class Friend {
	constructor(arg) {
		
	}
	
	static getFridens(){
		return datas.getFriends()
	}
	
	static async searchFriends(param){
		return await Http.request({
			url: "goodFriend/findFriend",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getFriendList(param){
		return await Http.request({
			url: "goodFriend/findFriendList",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getFriendInfo(param){
		return await Http.request({
			url: "goodFriend/findFriendByUid",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async findGoodFriendAuthMsgList(param){
		return await Http.request({
			url: "goodFriend/findGoodFriendAuthMsgList",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async addFriend(param){
		return await Http.request({
			url: "goodFriend/addFriend",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async updateGoodFriendMsgStatus(param){
		return await Http.request({
			url: "goodFriend/updateGoodFriendMsgStatus",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async agreeAddFriend(param){
		return await Http.request({
			url: "goodFriend/agreeAddFriend",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async refuseAddFriend(param){
		return await Http.request({
			url: "goodFriend/refuseAddFriend",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
}

export {
	Friend
}